import request from '@/utils/request'

export function login(username, password) {
  const data = {
    principal:username,
    credentials:password
  }
  return request({
    url: '/login?grant_type=admin',
    data
  })
}

export function logout() {
  console.log('[woqu]',);
  
  return request({
    url: '/sys/logout'
    // method: 'post'
  })
}

export function getInfo(token) {
  return request({
    url: '/userinfo',
    method: 'get'
  })
}

